#include "../../common/commonbase.h"

namespace NET{
    const int MAXBUFFER = 4096;

    class ClientNet{
        public:
            ClientNet();
            ~ClientNet();

            void connect();
            // 发送消息，发送完了即完成，
            int sendMsg(std::string msg);
            // 接受消息，
            std::string onRecvMsg();

            void test();

        private:
            void error(std::string errorMsg, int errorCode = 0);

        private:
            int connfd;
    };
}